package com.joney.backstage.entity.enums;

import com.baomidou.mybatisplus.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;

import java.io.Serializable;

/**
 * token状态枚举
 */
public enum TokenStatusEnum implements IEnum {
    INVALID(0, "失效"),
    NORMAL(1, "正常");

    private int value;
    private String desc;

    TokenStatusEnum(final int value, final String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public Serializable getValue() {
        return this.value;
    }

    public int getIntValue() {
        return this.value;
    }

    @JsonValue
    public String getDesc(){
        return this.desc;
    }
}
